/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-08-16 15:03:11
 * @LastEditors: 李天惊 uf_lee@163.com
 * @LastEditTime: 2023-01-02 16:17:36
 * @FilePath: \grazlink20\uc_sys\src\api\fa\medical\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 * 就医记录-接口
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 列表
export const adminFaMedicalOrderListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderList',
      data: data
    }
  })
}

// 新增
export const adminFaMedicalOrderAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderAdd',
      data: data
    }
  })
}

// 查看
export const adminFaMedicalOrderSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderSee',
      data: data
    }
  })
}

// 删除
export const adminFaMedicalOrderDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderDel',
      data: data
    }
  })
}

// 修改
export const adminFaMedicalOrderEditApi = (data: any) => {
  console.log(data)
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderEdit',
      data: data
    }
  })
}

// 明细列表
export const adminFaMedicalOrderDetailedListApi = (data: any) => {
  console.log(data)
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'adminFaMedicalOrderDetailedList',
      data: data
    }
  })
}
